const Login2 = () => import('@/views/index/login/login')
const Login = () => import('@/views/index/login')
const Apply = () => import('@/views/index/apply')
const Detail = () => import('@/views/index/detail')
const Home = () => import('@/views/index/home')
const Rank = () => import('@/views/index/rank/rank')
const Introduction = () => import('@/views/index/introduction')
const Empty = () => import('@/views/index/empty')
const Goods = () => import('@/views/index/goods')
const Game = () => import('@/views/index/game')
const Wine = () => import('@/views/index/wine')
const BigWheel = () => import('@/views/index/bigwheel')


const routes = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        name: 'login2',
        component: Login2,
        meta: {
            index: 0,
            title: '登录2'
        }
    },
    {
        name: 'login',
        component: Login,
        meta: {
            index: 0,
            title: '登录'
        }
    },
    {
        path: '/apply',
        name: 'apply',
        component: Apply,
        meta: {
            index: 0,
            title: '申请加入'
        }
    },
    {
        path: '/detail',
        name: 'detail',
        component: Detail,
        meta: {
            index: 0,
            title: '个人详情'
        }
    },
    {
        path: '/home',
        name: 'home',
        component: Home,
        meta: {
            index: 0,
            title: '投票首页'
        }
    },
    {
        path: '/rank',
        name: 'rank',
        component: Rank,
        meta: {
            index: 0,
            title: '排行榜'
        }
    },
    {
        name: 'introduction',
        component: Introduction,
        meta: {
            index: 0,
            title: '活动说明'
        }
    },
    {
        name: 'empty',
        component: Empty,
        meta: {
            index: 0,
            title: '404'
        }
    },
    {
        name: 'goods',
        component: Goods,
        meta: {
            index: 0,
            title: '商品'
        }
    },
    {
        name: 'game',
        component: Game,
        meta: {
            index: 0,
            title: '游戏'
        }
    },
    {
        name: 'wine',
        component: Wine,
        meta: {
            index: 0,
            title: '酒信息'
        }
    },
    {
        name: 'bigwheel',
        component: BigWheel,
        meta: {
            index: 0,
            title: '大转盘'
        }
    }
];

// add route path
routes.forEach(route => {
    route.path = route.path || '/' + (route.name || '');
});

export default routes
